<?php
echo $this->render('system/setting/_tab.phtml');
$this->headScript()->appendFile(_STATIC_HTTP . '/jquery/checkAll.js');
?>
<form action="" method="post">
<div class="body">
	<table class="list">
		<tr>
			<th class="narrow"><?php echo $this->language('SYS');?></th>
			<th class="id"><?php echo $this->language('NAME');?></th>
			<th><?php echo $this->language('VALUE');?></th>
			<th><?php echo $this->language('DESCRIPTION');?></th>
			<th class="narrow center"><?php echo '<input type="checkbox" name="select-all" id="select-all" value="1" rel="name[]" />';?></th>
		</tr>
		<?php foreach($this->list AS $row) { ?>
		<tr>
			<td class="center"><?php echo ($row->getIsSystem() ? '√' : '');?></td>
			<td><a href="<?php echo $this->url('system/setting/edit', array('name' => $row->getName()));?>"><?php echo $row->getName();?></a></td>
			<td><?php echo $this->escape($row->getValue());?></td>
			<td><?php echo $this->escape($row->getDescription());?></td>
			<td class="center"><?php
			if(!$row->getIsSystem()) {
				if(in_array($row->getName(), $this->checkedList)) {
					$checked = array('checked' => 'checked');
				} else {
					$checked = array();
				}
				echo $this->form()->checkbox('name[]', $row->getName(), array_merge(array('id' => 'name-' . $row->getName()), $checked));
			}
			?></td>
		</tr>
		<?php } ?>
		<?php if(count($this->list) <= 0) {?>
		<tr>
			<td colspan="5" class="nohover">
				<div class="msg">
					<div class="common error" style="border:0;background:#fff;">
						<i class="icon"></i>
						<h4>STOP</h4>
						<div class="msg-bd">
							No Setting found. 
						</div>
					</div>
				</div>
			</td>
		</tr>
		<?php } ?>
	</table>
</div>
<div class="body">
	<div style="float:right;margin-bottom:5px;">
		<?php echo $this->render('include/deleteButton.phtml');?>
	</div>
	<?php echo $this->paginator($this->list)->render();?>
</div>
</form>
